<?php
	header("Content-type:text/html;charset=utf-8");
	
	$name = $_GET["userName"];
	
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("feike");
	
	$result =  mysql_query("select * from login where phoneNum = '$name'",$conn);
	
	// echo mysql_num_rows($result);
	// 前后端分离
	if(mysql_num_rows($result)==1){
		echo "1";
	}else{
		echo "0";
		 mysql_query("insert into login(phoneNum) values($name)",$conn);
	}
	
    mysql_close($conn);



?>